<%@ page import="static com.test.ws.s1.utils.Res.fileUrl" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>编辑用户</title>
    <style>
        .container {
            width: 500px;
            margin: 20px auto;
            padding: 20px;
            border: 1px solid #ddd;
            border-radius: 5px;
        }
        .form-group {
            margin-bottom: 15px;
        }
        label {
            display: block;
            margin-bottom: 5px;
            font-weight: bold;
        }
        input[type="text"],
        input[type="password"],
        input[type="tel"],
        select {
            width: 100%;
            padding: 8px;
            border: 1px solid #ddd;
            border-radius: 4px;
            box-sizing: border-box;
        }
        .btn-group {
            margin-top: 20px;
            text-align: right;
        }
        .btn {
            padding: 8px 20px;
            margin-left: 10px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }
        .btn-primary {
            background-color: #007bff;
            color: white;
        }
        .btn-secondary {
            background-color: #6c757d;
            color: white;
        }


        .avatar {
            border-radius: 50%;
            width: 50px;
            height: 50px;
            object-fit: cover;
            border: 2px solid #ddd;  /* 可选边框 */
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);  /* 可选阴影 */
        }

    </style>
</head>
<body>
<div class="container">
    ${im}
    <h2>编辑用户信息</h2>
    <form action="${pageContext.request.contextPath}/imgGai" method="post" enctype="multipart/form-data">
        <input type="hidden" name="imgs_id" value="${im.imgs_id}">

        <div class="form-group">
            <label>线路名:</label>
            <input type="text" name="route_name" value="${im.route.route_name}" required>
        </div>

        <div class="form-group">
            <label>状态:</label>
            <input type="text" name="imgs_zt" value="${im.imgs_zt}" required>
        </div>

        <div class="form-group">
            <label>是否轮播:</label>
            <input type="text" name="imgs_lbzt" value="${im.imgs_lbzt}" required>
        </div>

        <div class="form-group">
            <label>头像:</label>
            <img src="<%=fileUrl%>${im.imgs_dz}" height="50px" width="50px" class="avatar">
            <p>修改头像:<input type="file" name="image"></p>
        </div>

        <div class="btn-group">
            <button type="submit" class="btn btn-primary">保存修改</button>
            <a href="${pageContext.request.contextPath}/imgsCha" class="btn btn-secondary">返回列表</a>
        </div>
    </form>
</div>
</body>
</html>
